package com.tledu.spring.service.impl;

import com.tledu.spring.dao.CraftMapper;
import com.tledu.spring.domain.Craft;
import com.tledu.spring.service.ICraftService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@AllArgsConstructor
public class CraftServiceImpl implements ICraftService {
    private final CraftMapper craftMapper;
    @Override
    public List<Craft> query(Craft craft) {
        return craftMapper.query(craft);
    }

    @Override
    public void insert(Craft craft) {
         int i = craftMapper.insert(craft);
    }

    @Override
    public void delete(Integer cr_id) {
        craftMapper.delete(cr_id);
    }

    @Override
    public void update(Craft craft) {
        craftMapper.update(craft);
    }

    @Override
    public List<Craft> selectByAll(Craft craft) {
        return craftMapper.selectByAll(craft);
    }

    @Override
    public Craft selectByCr_Id(Integer cr_id) {
        return craftMapper.selectByCr_Id(cr_id);
    }
}
